commonlibsse_ng\re\h/
hkBaseObject.rs1use crate::re::offsets_rtti::RTTI_hkBaseObject;
6use crate::re::offsets_vtable::VTABLE_hkBaseObject;
7use crate::rel::id::VariantID;
8use core::ffi::c_void;
9
10#[repr(C)]
11#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
12pub struct hkBaseObject {
13 pub vtable: *const hkBaseObjectVtbl,
14}
15const _: () = assert!(core::mem::size_of::<hkBaseObject>() == 0x8);
16
17impl Default for hkBaseObject {
18 #[inline]
19 fn default() -> Self {
20 Self::new()
21 }
22}
23
24impl hkBaseObject {
25 pub const RTTI: VariantID = RTTI_hkBaseObject;
27
28 pub const VTABLE: [VariantID; 1] = VTABLE_hkBaseObject;
30
31 #[inline]
33 pub const fn new() -> Self {
34 Self { vtable: &HK_BASE_OBJECT_VTBL }
35 }
36}
37
38pub struct hkBaseObjectVtbl {
39 pub CxxDrop: unsafe extern "C" fn(this: *mut c_void),
41}
42impl hkBaseObjectVtbl {
43 const fn new() -> Self {
44 const unsafe extern "C" fn CxxDrop(_this: *mut c_void) {}
45
46 Self { CxxDrop }
47 }
48}
49
50static HK_BASE_OBJECT_VTBL: hkBaseObjectVtbl = hkBaseObjectVtbl::new();